package org.hxd.notice.service;

import org.hxd.notice.dao.NoticeDao;
import org.hxd.pojo.Notice;
import org.hxd.pojo.User_inf;
import org.hxd.units.PageModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;
import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService{
    @Autowired
    NoticeDao noticeDao;
    @Override
    public List<Notice> findnotice(Notice notice, PageModel pageModel) {
        return noticeDao.findnotice(notice,pageModel);
    }

    @Override
    public int findNoticeCount(Notice notice) {
        return noticeDao.findNoticeCount(notice);
    }

    @Override
    public int addNotice(Notice notice, User_inf user) {
        return noticeDao.addNotice(notice,user.getId());
    }

    @Override
    public int removeNotice(Integer[] ids) {
        return noticeDao.removeNotice(ids);
    }

    @Override
    public Notice findNoticeById(int id) {
        return noticeDao.findNoticeById(id);
    }

    @Override
    public int updateNotice(Notice notice) {
        return noticeDao.updateNotice(notice);
    }

}
